import { APP_HEADER_MENU_ITEM_ENUM, APP_HEADER_MENU_ITEM_NAME_MAP } from '../constants/appHeader'
import { getCanvasConfigMenu } from '../utils/menu'

export const ROUTER_CONFIG = [
  {
    path: '/',
    redirect: '/application',
  },
  {
    path: '/application',
    redirect: '/application/canvas-config',
    meta: {
      topMenu: {
        label: APP_HEADER_MENU_ITEM_NAME_MAP[APP_HEADER_MENU_ITEM_ENUM.CANVAS_CONFIG],
      },
      subMenu: {
        config: getCanvasConfigMenu(),
      }
    },
    component: () => import('../views/ApplicationBuild.vue'),
    children: [
      {
        path: 'canvas-config',
        component: () => import('../views/CanvasConfig.vue'),
      },
    ],
  },
]